<template>
  <div style="margin-right: 20px">
    <el-dropdown trigger="click" @command="changeLanguage">
      <div>
        <svg-icon style="color:#fff;font-size:20px" icon-class="language" />
      </div>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item command="zh" :disabled="'zh'== $i18n.locale " @click.native="$i18n.locale = 'zh' ">中文</el-dropdown-item>
        <el-dropdown-item command="en" :disabled="'en'== $i18n.locale " @click.native="$i18n.locale = 'en'">en</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
export default {
  name: 'Departments',

  data() {
    return {

    }
  },

  created() {
    console.log(this.$i18n.locale, '0000')
  },

  methods: {
    changeLanguage() {}
  }
}
</script>

<style lang="scss" scoped>

</style>
